<admintpl file="header" />
</head>
<body>

	<div class="wrap js-check-wrap">
		<ul class="nav nav-tabs">
				<li class="active"><a href="javascript:;">本部卡充值明细</a></li>
		</ul>
		<form class="well form-search" id="form_search" method="post" action="">
			<if condition="$is_manager">
                <select id="s_m_rid" name="s_m_rid" onchange="change_s_m_rid()" style="margin:0px;">
                    <option value="">请选择上级卡片所属机构</option>
                    <foreach name="logistics_manager_list" item="litem">
                        <option value="{$litem['id']}" <if condition="$s_m_rid == $litem['id']">selected</if>>{$litem.logistics_name}</option>
                    </foreach>
                </select>
				<select id="s_rid" name="s_rid" style="margin:0px;">
					<option value="">请选择卡片所属机构</option>
					<foreach name="logistics_list" item="litem">
						<option value="{$litem['id']}" <if condition="$s_rid == $litem['id']">selected</if>>{$litem.logistics_name}</option>
					</foreach>
				</select>
				<select id="s_sale_id" name="s_sale_id" style="margin:0px;">
					<option value="">请选择消费机构</option>
					<foreach name="sale_list" item="litem">
						<option value="{$litem['id']}" <if condition="$s_sale_id == $litem['id']">selected</if>>{$litem.sale_name}</option>
					</foreach>
				</select>
				<select id="s_admin_id" name="s_admin_id" style="margin:0px;">
					<option value="">请选择操作用户</option>
					<foreach name="admin_list" item="litem">
						<option value="{$litem['id']}" <if condition="$s_admin_id == $litem['id']">selected</if>>{$litem.user_nicename}</option>
					</foreach>
				</select>
			</if>
			<input type="text" name="s_start_time" id="s_start_time" value="<php> echo date('Y-m-d H:i',$s_start_time);</php>" class="js-datetime" placeholder="开始时间" >
			至
			<input type="text" name="s_end_time" id="s_end_time" value="<php> echo date('Y-m-d H:i',$s_end_time);</php>" class="js-datetime" placeholder="结束时间">
			<input type="text" name="s_card_number" id="s_card_number" value="{$s_card_number}" placeholder="请输入卡号" >
			<input type="submit" class="btn btn-primary" value="搜索" />
			<a class="btn btn-primary" style="float: right;margin-left:15px;margin-bottom:10px;" href="javascript:$('.table-list').jqprint();">打印</a>
			<a class="btn btn-primary" style="float: right;" href="javascript:downloadExcel(2);">导出PDF</a>
			<input type="hidden" name="s_download" id="s_download" value="0"/>
			<a class="btn btn-primary" style="float: right;margin-right:15px;margin-bottom:10px;" href="javascript:downloadExcel(1);">导出报表</a>

		</form>
		<form class="js-ajax-form" action="" method="post">

			<table class="table table-hover table-bordered table-list">
				<thead>
					<tr>

                        <th>创建日期</th>
						<th>所属机构</th>
						<th>充值机构</th>
						<th>流水号	</th>
						<th>会员卡号</th>
						<th>充值类型</th>
						<!-- <th>支付类型</th> -->
						<th>充值金额</th>
						<th>平台奖励</th>
                        <th>充值赠送</th>
                        <th>充值返利</th>
						<th>充值状态</th>
                        <th>充值后余额</th>
						<th>充值描述</th>

					</tr>
				</thead>
				<foreach name="list" item="vo">
				<tr class="show_chlid">
                    <td>
						<b>
							<span class="arrow_right"></span>
						{:date("Y-m-d H:i:s",$vo['create_time'])}
					</b></td>
					<td>{$vo.logistics_name}</td>
					<td>{:$vo['sale_id']?$vo['sale_name']:$vo['logistics_name']}</td>
                    <td>{$vo.number}</td>
                    <td>{$vo.card_number}</td>
                    <td>{:($vo[sale_id]?'消费机构充值':'物流公司充值')}</td>
                    <!-- <td>卡帐户转账</td> -->
                    <td>{$vo.price}</td>
                    <td>{$vo.general_price}</td>
                    <td>{$vo.self_price}</td>
                    <td>{$vo.rebate_price}</td>
                    <td>{:($vo[status] == '2'?'成功':'未完成')}</td>
                    <td>{$vo.after_balance}</td>
                    <td>{$vo.desc}</td>
				</tr>
                  <tr class="tr_chlid">
                      <td colspan="10">
                          <ul>
                              <li>开卡费：{$vo.active_price}</li>
                              <li>充值前余额：{$vo.before_balance}</li>
                              <li>充值机构：{:$vo['sale_id']?$vo['sale_name']:$vo['logistics_name']}</li>
                              <!--<li>卡片所属机构：{$vo.logistics_name}</li>-->
                              <li>会员姓名：{$vo.vip_name}</li>
                              <li>会员手机：{$vo.vip_phone}</li>
                              <li>会员车牌：{$vo.vip_plate_number}</li>
                              <li>操作员姓名：{$vo.user_nicename}</li>
							  <li>操作员手机号：{$vo.user_phone}</li>
                              <li>充值描述：{$vo.desc}</li>
	                          <li><a href="/index.php?g=Logistics&m=AdminCard&a=recharge_print&id={$vo.id}" style="font-weight: bold;">补打小票</a></li>
                          </ul>
                      </td>
                  </tr>
				</foreach>
			</table>

			<div class="pagination">{$page}</div>
		</form>
	</div>
	<script src="__PUBLIC__/js/common.js?<php>echo time();</php>"></script>
	<script src="__PUBLIC__/js/jquery.jqprint-0.3.js"></script>
	<script>
		function refersh_window() {
			var refersh_time = getCookie('refersh_time');
			if (refersh_time == 1) {
				window.location = "{:U('AdminFinance/index',$formget)}";
			}
		}

        $(function(){
            $('#s_m_rid').select2();
            $('#s_rid').select2();
            $("#s_sale_id").select2();
            $("#s_admin_id").select2();
        });


	</script>
</body>
</html>